package com.company;

public class TrianglePacket implements Comparable<TrianglePacket> {
    int id;
    int triangle;

    public TrianglePacket(int id, int triangle) {
        this.id = id;
        this.triangle = triangle;
    }

    public int getId() {
        return id;
    }

    public int getValue() {
        return triangle;
    }

    @Override
    public int compareTo(TrianglePacket o) {
        return o.triangle - this.triangle;
    }

    @Override
    public String toString() {
        return "NodeTrianglePacket{" +
                "id=" + id +
                ", triangle=" + triangle +
                '}';
    }
}
